]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dnd: Set the scale on the drag actor
authorJasper St. Pierre <jstpierre@mecheye.net>
Sun, 7 Apr 2013 18:56:46 +0000 (14:56 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 8 Apr 2013 18:57:49 +0000 (14:57 -0400)
The actor is the same as the drag actor in this case, but we tend to
set properties on the drag actor and get them from the actor elsewhere
in this codepath. Make this consistent.

https://bugzilla.gnome.org/show_bug.cgi?id=697504

js/ui/dnd.js

index 4a61cd1d20984597fd66d2949f7ea2b8f2283a4a..1841f4953191136adc71dfc922b49cc818232f17 100644 (file)
@@ -302,8 +302,8 @@ const _Draggable = new Lang.Class({
             // Set the actor's scale such that it will keep the same
             // transformed size when it's reparented to the uiGroup
             let [scaledWidth, scaledHeight] = this.actor.get_transformed_size();
-            this.actor.set_scale(scaledWidth / this.actor.width,
-                                 scaledHeight / this.actor.height);
+            this._dragActor.set_scale(scaledWidth / this.actor.width,
+                                      scaledHeight / this.actor.height);
         }
 
         this._dragOrigOpacity = this._dragActor.opacity;